Skip to content

Conversation

@alexqyle
Copy link
Contributor

@alexqyle alexqyle commented Dec 31, 2025

What this PR does:

Add graceful period for compaction groups to avoid compacting recently written blocks. The reason adding such graceful period is to reduce number of versions of partitioned grouped with same partitioned group ID. This allows grouping only starts when as many as blocks got uploaded. Also, the graceful period could reduce the race condition between the bucket index state and the real block states in bucket store.

Which issue(s) this PR fixes:
NA

Checklist

  • Tests updated
  • Documentation added
  • CHANGELOG.md updated - the order of entries should be [CHANGE], [FEATURE], [ENHANCEMENT], [BUGFIX]

@danielblando
Copy link
Contributor

Code lgtm.
Can you add more data on why this is being done?
For non-partition enabled, is this also valid?

@alexqyle
Copy link
Contributor Author

alexqyle commented Jan 6, 2026

Code lgtm. Can you add more data on why this is being done? For non-partition enabled, is this also valid?

Updated description. And this change would not change any logic for non-partition. The graceful period only applies to partitioning compaction.

Copy link
Contributor

@danielblando danielblando left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@danielblando danielblando merged commit 1ba0cb0 into cortexproject:master Jan 6, 2026
73 of 77 checks passed
@alexqyle alexqyle deleted the compaction-graceful-period branch January 8, 2026 22:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants